﻿using AuroraPlatform.Chaneels.ServiceReference;
using System;
using System.Net;
using System.ServiceModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace AuroraPlatform.Chaneels
{
    public partial class Services
    {
        public static string ServicesUrl
        {
            get;
            set;
        }

        public WebServiceSoapClient AuroraService { get; set; }

        #region Server.Business
        //private static WebServiceSoapClient _lightingService;
        //public static WebServiceSoapClient LightingService
        //{
        //    get
        //    {
        //        if (_lightingService == null)
        //        {

        //            var binding = new BasicHttpBinding()
        //            {
        //                MaxBufferSize = int.MaxValue,
        //                MaxReceivedMessageSize = int.MaxValue,
        //                SendTimeout = TimeSpan.FromMinutes(10),
        //                ReceiveTimeout = TimeSpan.FromMinutes(10),
        //            };

        //            _lightingService = new WebServiceSoapClient(binding, new EndpointAddress(ServicesUrl + "/WebService.asmx"));
        //        }

        //        return _lightingService;
        //    }
        //}

        private WebServiceSoap AuroraInterface
        {
            get
            {
                return (WebServiceSoap)AuroraService;
            }
        }
        #endregion
    }
}
